<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Encrypted file transfer: /home/marco/dev/comm/bigint.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Encrypted file transfer
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('bigint_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">bigint.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;gmp.h&gt;</code><br/>
</div>
<p><a href="bigint_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a86e1969b50e55e5d506233078ca0fa4c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a86e1969b50e55e5d506233078ca0fa4c">READ_SIZE</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:a86e1969b50e55e5d506233078ca0fa4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default number of bytes that will be read from /dev/urandom when generating random numbers.  <a href="#a86e1969b50e55e5d506233078ca0fa4c">More...</a><br/></td></tr>
<tr class="separator:a86e1969b50e55e5d506233078ca0fa4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a73994c0f34d7160878e5307f221f60"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a1a73994c0f34d7160878e5307f221f60">WORD_COUNT</a>&#160;&#160;&#160;8</td></tr>
<tr class="separator:a1a73994c0f34d7160878e5307f221f60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a510f24e62cc4f39f2bc257ceaa9fcfa9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a510f24e62cc4f39f2bc257ceaa9fcfa9">WORD_ORDER</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a510f24e62cc4f39f2bc257ceaa9fcfa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92ed8507d1cd2331ad09275c5c4c1c89"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a92ed8507d1cd2331ad09275c5c4c1c89">WORD_SIZE</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:a92ed8507d1cd2331ad09275c5c4c1c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4848daa5cfb57d9748c39c5633fcb1f4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a4848daa5cfb57d9748c39c5633fcb1f4">ENDIAN</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a4848daa5cfb57d9748c39c5633fcb1f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6f583706dd0b9e2603fab90b2cf21af"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#ab6f583706dd0b9e2603fab90b2cf21af">NAILS</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ab6f583706dd0b9e2603fab90b2cf21af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9dfcd50cc9f5d315af96654a7817e3bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a9dfcd50cc9f5d315af96654a7817e3bc">get_seed</a> (mpz_t ret, mpz_t bigger_than)</td></tr>
<tr class="memdesc:a9dfcd50cc9f5d315af96654a7817e3bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">ret is a random number bigger than bigger_than  <a href="#a9dfcd50cc9f5d315af96654a7817e3bc">More...</a><br/></td></tr>
<tr class="separator:a9dfcd50cc9f5d315af96654a7817e3bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fc1c27c4eff5f372a44e1264aad6f73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a6fc1c27c4eff5f372a44e1264aad6f73">get_prime</a> (mpz_t ret, mpz_t bigger_than)</td></tr>
<tr class="memdesc:a6fc1c27c4eff5f372a44e1264aad6f73"><td class="mdescLeft">&#160;</td><td class="mdescRight">ret is a prime number bigger than bigger_than  <a href="#a6fc1c27c4eff5f372a44e1264aad6f73">More...</a><br/></td></tr>
<tr class="separator:a6fc1c27c4eff5f372a44e1264aad6f73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bceae70622bd0ea9dbce472fff5a5d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a9bceae70622bd0ea9dbce472fff5a5d5">get_rnd</a> (mpz_t ret)</td></tr>
<tr class="memdesc:a9bceae70622bd0ea9dbce472fff5a5d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">ret is a random number generated from /dev/urandom  <a href="#a9bceae70622bd0ea9dbce472fff5a5d5">More...</a><br/></td></tr>
<tr class="separator:a9bceae70622bd0ea9dbce472fff5a5d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a653d4c9eac902f3d26e54bedf1be8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a8a653d4c9eac902f3d26e54bedf1be8c">get_rnd_n</a> (mpz_t ret, int read_size)</td></tr>
<tr class="memdesc:a8a653d4c9eac902f3d26e54bedf1be8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">same as get_rnd, but specify how many bytes of urandom have to be read  <a href="#a8a653d4c9eac902f3d26e54bedf1be8c">More...</a><br/></td></tr>
<tr class="separator:a8a653d4c9eac902f3d26e54bedf1be8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af52cd8b4682278b6ce4570d79d24c502"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#af52cd8b4682278b6ce4570d79d24c502">get_pow</a> (mpz_t ret, mpz_t base, mpz_t exp, mpz_t modulo)</td></tr>
<tr class="memdesc:af52cd8b4682278b6ce4570d79d24c502"><td class="mdescLeft">&#160;</td><td class="mdescRight">ret is the result of the xponentiation of base to exp modulo modulo  <a href="#af52cd8b4682278b6ce4570d79d24c502">More...</a><br/></td></tr>
<tr class="separator:af52cd8b4682278b6ce4570d79d24c502"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f15839155112766660152150d96b4fd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a3f15839155112766660152150d96b4fd">get_inverse</a> (mpz_t ret, mpz_t op, mpz_t modulo)</td></tr>
<tr class="memdesc:a3f15839155112766660152150d96b4fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">ret is the inverse of operand op modulo modulo  <a href="#a3f15839155112766660152150d96b4fd">More...</a><br/></td></tr>
<tr class="separator:a3f15839155112766660152150d96b4fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54e488fdca37118c33dd29386b5b2e7f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a54e488fdca37118c33dd29386b5b2e7f">mpz_to_bytes</a> (char *buffer, mpz_t number, size_t *count)</td></tr>
<tr class="memdesc:a54e488fdca37118c33dd29386b5b2e7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">convert integer number to count plain bytes stored in buffer  <a href="#a54e488fdca37118c33dd29386b5b2e7f">More...</a><br/></td></tr>
<tr class="separator:a54e488fdca37118c33dd29386b5b2e7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a351a4bbdd4476151634cf3a5e2966630"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a351a4bbdd4476151634cf3a5e2966630">bytes_to_mpz</a> (mpz_t number, char *buffer)</td></tr>
<tr class="memdesc:a351a4bbdd4476151634cf3a5e2966630"><td class="mdescLeft">&#160;</td><td class="mdescRight">convert bytes of buffer into integer, stored in number  <a href="#a351a4bbdd4476151634cf3a5e2966630">More...</a><br/></td></tr>
<tr class="separator:a351a4bbdd4476151634cf3a5e2966630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e8bbdc21a84c26184b99cd801dddecc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a0e8bbdc21a84c26184b99cd801dddecc">mpz_2_bytes</a> (char *buffer, mpz_t number, size_t *count)</td></tr>
<tr class="memdesc:a0e8bbdc21a84c26184b99cd801dddecc"><td class="mdescLeft">&#160;</td><td class="mdescRight">custom edition of mpz_to_bytes  <a href="#a0e8bbdc21a84c26184b99cd801dddecc">More...</a><br/></td></tr>
<tr class="separator:a0e8bbdc21a84c26184b99cd801dddecc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af05770165fb84c71aa4949563713724d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#af05770165fb84c71aa4949563713724d">bytes_2_mpz</a> (mpz_t number, char *buffer, size_t count)</td></tr>
<tr class="memdesc:af05770165fb84c71aa4949563713724d"><td class="mdescLeft">&#160;</td><td class="mdescRight">custom edition of bytes_to_mpz  <a href="#af05770165fb84c71aa4949563713724d">More...</a><br/></td></tr>
<tr class="separator:af05770165fb84c71aa4949563713724d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff351045b7de9645261510d83aef9e0e"><td class="memItemLeft" align="right" valign="top">unsigned long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#aff351045b7de9645261510d83aef9e0e">char2uli</a> (const char c)</td></tr>
<tr class="memdesc:aff351045b7de9645261510d83aef9e0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">convert char into unsigned long int  <a href="#aff351045b7de9645261510d83aef9e0e">More...</a><br/></td></tr>
<tr class="separator:aff351045b7de9645261510d83aef9e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a118b67bb39caee74244b51d8d1152e81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a118b67bb39caee74244b51d8d1152e81">get_mod</a> (mpz_t ret, mpz_t number, mpz_t modulo)</td></tr>
<tr class="separator:a118b67bb39caee74244b51d8d1152e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a230d971e08fa0651e7a92170c7edd8dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bigint_8h.html#a230d971e08fa0651e7a92170c7edd8dd">get_rnd_inv</a> (mpz_t rnd, mpz_t inv, mpz_t modulo)</td></tr>
<tr class="memdesc:a230d971e08fa0651e7a92170c7edd8dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a random number rnd and its inverse inv modulo modulo  <a href="#a230d971e08fa0651e7a92170c7edd8dd">More...</a><br/></td></tr>
<tr class="separator:a230d971e08fa0651e7a92170c7edd8dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a4848daa5cfb57d9748c39c5633fcb1f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENDIAN&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="bigint_8h_source.html#l00009">9</a> of file <a class="el" href="bigint_8h_source.html">bigint.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab6f583706dd0b9e2603fab90b2cf21af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NAILS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="bigint_8h_source.html#l00010">10</a> of file <a class="el" href="bigint_8h_source.html">bigint.h</a>.</p>

</div>
</div>
<a class="anchor" id="a86e1969b50e55e5d506233078ca0fa4c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define READ_SIZE&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default number of bytes that will be read from /dev/urandom when generating random numbers. </p>

<p>Definition at line <a class="el" href="bigint_8h_source.html#l00004">4</a> of file <a class="el" href="bigint_8h_source.html">bigint.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1a73994c0f34d7160878e5307f221f60"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WORD_COUNT&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="bigint_8h_source.html#l00006">6</a> of file <a class="el" href="bigint_8h_source.html">bigint.h</a>.</p>

</div>
</div>
<a class="anchor" id="a510f24e62cc4f39f2bc257ceaa9fcfa9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WORD_ORDER&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="bigint_8h_source.html#l00007">7</a> of file <a class="el" href="bigint_8h_source.html">bigint.h</a>.</p>

</div>
</div>
<a class="anchor" id="a92ed8507d1cd2331ad09275c5c4c1c89"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WORD_SIZE&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="bigint_8h_source.html#l00008">8</a> of file <a class="el" href="bigint_8h_source.html">bigint.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="af05770165fb84c71aa4949563713724d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int bytes_2_mpz </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>custom edition of bytes_to_mpz </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00114">114</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a351a4bbdd4476151634cf3a5e2966630"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void bytes_to_mpz </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>convert bytes of buffer into integer, stored in number </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00083">83</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="aff351045b7de9645261510d83aef9e0e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long int char2uli </td>
          <td>(</td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>convert char into unsigned long int </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00133">133</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a3f15839155112766660152150d96b4fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int get_inverse </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>modulo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ret is the inverse of operand op modulo modulo </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00073">73</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a118b67bb39caee74244b51d8d1152e81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_mod </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>modulo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00142">142</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="af52cd8b4682278b6ce4570d79d24c502"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_pow </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>modulo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ret is the result of the xponentiation of base to exp modulo modulo </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00067">67</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a6fc1c27c4eff5f372a44e1264aad6f73"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_prime </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>bigger_than</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ret is a prime number bigger than bigger_than </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00026">26</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9bceae70622bd0ea9dbce472fff5a5d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_rnd </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ret is a random number generated from /dev/urandom </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00061">61</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a230d971e08fa0651e7a92170c7edd8dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_rnd_inv </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>rnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>inv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>modulo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get a random number rnd and its inverse inv modulo modulo </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00149">149</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a8a653d4c9eac902f3d26e54bedf1be8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_rnd_n </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>read_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>same as get_rnd, but specify how many bytes of urandom have to be read </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00036">36</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9dfcd50cc9f5d315af96654a7817e3bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_seed </td>
          <td>(</td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>ret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>bigger_than</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ret is a random number bigger than bigger_than </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00008">8</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a0e8bbdc21a84c26184b99cd801dddecc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mpz_2_bytes </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>custom edition of mpz_to_bytes </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00088">88</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
<a class="anchor" id="a54e488fdca37118c33dd29386b5b2e7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mpz_to_bytes </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mpz_t&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>convert integer number to count plain bytes stored in buffer </p>

<p>Definition at line <a class="el" href="bigint_8c_source.html#l00079">79</a> of file <a class="el" href="bigint_8c_source.html">bigint.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_48915bc83c3e9a2c33920cc086982b8a.html">comm</a></li><li class="navelem"><a class="el" href="bigint_8h.html">bigint.h</a></li>
    <li class="footer">Generated on Sun Nov 16 2014 15:38:22 for Encrypted file transfer by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
